package basic.concurrent.lock;

/**
 * USER: lintc 【lintiancong@zhuojianchina.com】
 * DATE: 2017-05-27 15:59
 */
public class VolatileTest {
    public static volatile int x = 0;

    public static int j = 0;

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            new Thread(() -> {
                System.out.println(Thread.currentThread().getName() + ":" + x++);
            }).start();
        }
    }
}
